package com.bosssoft.user.permission.center.serve.service;


import cn.hutool.core.lang.tree.Tree;
import com.bosssoft.user.permission.center.serve.pojo.dto.*;
import com.bosssoft.user.permission.center.serve.pojo.query.RoleQuery;
import com.bosssoft.user.permission.center.serve.pojo.query.RoleUserQuery;
import com.bosssoft.user.permission.center.serve.pojo.vo.RoleCompanyVO;
import com.bosssoft.user.permission.center.serve.pojo.vo.RoleUserVO;
import com.bosssoft.user.permission.center.serve.pojo.vo.RoleVO;
import common.data.commonresponse.CommonPage;

import java.util.List;

public interface RoleService {
    CommonPage<RoleVO> search(RoleQuery roleQuery);

    Boolean add(RoleDTO roleDTO);

    Boolean update(RoleDTO roleDTO);

    Boolean remove(List<Long> ids);

    Boolean allocateResource(RoleResourceDTO roleResourceDTO);

    Boolean allocateUser(RoleUserDTO roleUserDTO);

    List<Tree<String>> showRoleResource(RoleResourceCheckDTO roleResourceCheckDTO);

    Boolean allocateCompany(RoleCompanyDTO roleCompanyDTO);

    List<RoleCompanyVO> checkRoleCompany(List<Long> roleIds);

    String checkRoleCode(String code, Long roleId);

    String checkRoleIfHavingResource(Long roleId);

    Boolean allocateResourceAndCompany(RoleResourceAndCompanyDTO roleResourceAndCompanyDTO);

    CommonPage<RoleUserVO> checkRoleUser(RoleUserQuery roleUserQuery);
}
